# coding=utf-8

import json
import sys

if __name__ == '__main__':
    n = int(sys.argv[1])
    g = {
        str(i):{str(j):abs(i-j) for j in xrange(11)} for i in xrange(11)
    }
    print json.dumps(g)
